var assert = require('assert');

import { isTypedArray } from "util/types";
import {parseHTML} from "../src/parse.js";

describe("parse html:", function(){
    it("<a></a>", function(){
        let tree = parseHTML("<a></a>");
        assert.equal(tree.children[0].tagName, "a");
        assert.equal(tree.children[0].children.length, 0);

    });

    it("<a href=\"//time.geekbang.org\"></a>", function() {
        let tree = parseHTML("<a href=\"//time.geekbang.org\"></a>");
        console.log(tree);
        assert.equal(tree.children[0].children.length, 0);
    });
})